﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ShapeOperations
{
    class ShapeOperations
    {
        static void Main(string[] args)
        {
            Shape[] figures = 
            {
                new Circle (4),
                new Triangle(5,2),
                new Triangle(10,2),
                new Rectangle(11,4),
                new Circle(2)
            };
            foreach (Shape fig in figures)
            {
                Console.WriteLine("surface for {0} is {1:F3} sm2", fig.GetType().Name, fig.CalculateSurface());
            }
        }
    }
}
